@extends('layouts.master')

@section("css")
    @parent
    <link rel="stylesheet" type="text/css" href="/css/pages/list.css">
    <link rel="stylesheet" type="text/css" href="/css/pages/submit/list.css">
@stop

@section("body")
@include("components.left")

<div class="list_content">
    <div class="list_table">
        <table>
            <thead>
                <tr>
                    <th>编号</th>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>年龄</th>
                    <th>性别</th>
                    <th>体重</th>
                    <th>BMI</th>
                    <th>所在区域</th>
                    <th>创建时间</th>
                </tr>
            </thead>
            <tbody>
                @foreach($submits as $submit)
                <tr>
                    <td>{{$submit['id']}}</td>
                    <td>{{$submit['name']}}</td>
                    <td>{{$submit['phone']}}</td>
                    <td>{{$submit['age']}}</td>
                    <td>
                        @if($submit['sex'] != "")
                            {{$submit['sex']?"男":"女"}}
                        @endif
                    </td>
                    <td>{{$submit['weihgt']}}</td>
                    <td>{{$submit['bmi']}}</td>
                    <td>{{$submit['province']['province_name']}}</td>
                    <td>{{$submit['created_at']}}</td>
                </tr>
                @endforeach
            </tbody>
        </table>
    </div>
    <div class="page_div">
        <div class="page_info">
            共<span>{{$submits->total()}}</span>条记录
        </div>
        <a href="{{$submits->previousPageUrl()}}">
            <div class="prev_page">
                上一页
            </div>
        </a>
        <a href="{{$submits->nextPageUrl()}}">
            <div class="next_page">
                下一页
            </div>
        </a>
    </div>
</div>

@stop

@section("js")
    @parent
    <script type="text/javascript" src="/js/pages/case/list.js"></script>
@stop